package com.isoftstone.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
@Data
@Getter
@Setter
public class Student {
    // 学生ID
    private Integer id;

     //学号，唯一键
    private String studentNumber;

    // 姓名
    private String name;


    // 性别
    private String gender;

    // 年龄
    private Integer age;

    // 班级
    private String department ;

    // 专业
    private String major;

    // 联系电话
    private String phone;

    // 邮箱
    private String email;

    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private String enrollmentDate;

    // 家庭住址
    private String address;

    // 宿舍信息 (新增字段)
    private String dormitory;

    // 学生状态
    private String status;

    // 创建时间
    private LocalDateTime createdAt;

    // 更新时间
    private Date updatedAt;
//    学生密码
    private String password;
    private List<PaymentRecord> paymentRecords;
//    学生头像
    private String photo;
//宿舍id
    private Integer dormitoryId;

    @Override
    public String toString() {
        return "Student{" +
                "id=" + id +
                ", studentNumber='" + studentNumber + '\'' +
                ", name='" + name + '\'' +
                ", gender='" + gender + '\'' +
                ", age=" + age +
                ", department='" + department + '\'' +
                ", major='" + major + '\'' +
                ", phone='" + phone + '\'' +
                ", email='" + email + '\'' +
                ", enrollmentDate='" + enrollmentDate + '\'' +
                ", address='" + address + '\'' +
                ", dormitory='" + dormitory + '\'' +
                ", status='" + status + '\'' +
                ", createdAt=" + createdAt +
                ", updatedAt=" + updatedAt +
                ", password='" + password + '\'' +
                ", paymentRecords=" + paymentRecords +
                ", photo='" + photo + '\'' +
                ", dormitoryId=" + dormitoryId +
                '}';
    }
}
